base = 1
for p in range(1, 7830458):
    base *= 2
    base = int(str(base)[-20:])

print int(str(base * 28433) [-10:]) + 1
